<?php
require $_SERVER['DOCUMENT_ROOT'].'/../_core/common.php';

//记录日志
$db = new DB();
$ip = IP::get();
$username = Sessions::get('username');
$data = array('username'=>$username,'password'=>'','status'=>3,'ip'=>$ip,'created'=>time());
$db->table('logs_login')->insert($data)->run();

//清除
Sessions::clear();
$cookie = new Cookies();
$cookie->clear();

redirect('/admin/user/login.php');
exit;